FROM centos:7.9.2009
MAINTAINER lijialun
COPY epel-7.repo /etc/yum.repos.d/epel.repo
COPY Centos-7.repo /etc/yum.repos.d/CentOS-Base.repo
ADD vendor /opt/vendor

RUN echo 'nameserver 223.5.5.5' >> /etc/resolv.conf && \
    echo 'nameserver 223.6.6.6' >> /etc/resolv.conf && \
    echo 'nameserver 114.114.114.114' >> /etc/resolv.conf && \
    echo 'nameserver 8.8.8.8' >> /etc/resolv.conf && \
    yum clean all && \
    yum makecache && \
    yum -y groupinstall "Development Tools" && \
    yum -y install gdb gcc gcc-c++ && \
    yum -y update && \
    yum -y install unzip zip && \
    yum -y install dkms && \
    yum -y install vim nano && \
    yum -y install htop net-tools sysstat pciutils && \
    yum -y install iotop && \
    yum -y install iftop && \
    yum -y install wget screen tcpdump rsync tmux chrony linuxptp bind-utils nmap traceroute && \
    yum -y install valgrind && \
    yum -y install boost boost-thread boost-devel && \
    yum -y install libhugetlbfs-devel libhugetlbfs-utils && \
    yum -y install chrony && \
    yum -y install lm_sensors && \
    yum -y install hdparm && \
    yum -y install nvme-cli && \
    yum -y install centos-release-scl-rh && \
    yum -y install devtoolset-7-gcc devtoolset-7-gcc-c++ && \
    yum -y install devtoolset-8-gcc devtoolset-8-gcc-c++ && \
    yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ && \
    yum -y install devtoolset-10-gcc devtoolset-10-gcc-c++ && \
    yum -y install llvm-toolset-7 && \
    yum -y install kernel-devel && \
    yum -y install openssl openssl-devel && \
    yum -y install cyrus-sasl-devel && \
    yum -y install libpcap-devel && \
    yum -y install git && \
    yum -y install openconnect && \
    yum -y install tinyproxy && \
    yum -y install nload && \
    yum -y install p7zip p7zip-plugins && \
    yum -y install xz-devel zlib-devel && \
    yum -y install lz4-devel lz4 && \
    yum -y install texinfo && \
    yum -y install zsh && \
    yum -y install autossh
RUN cd /opt/vendor && tar -xvf cmake-3.17.5.tar.gz && cd cmake-3.17.5 && ./bootstrap --prefix=/usr/local && make -j5 && make install
RUN cd /opt/vendor && tar -xvf zstd-1.5.0.tar.gz && cd zstd-1.5.0 && make -j5 && make install
RUN cd /opt/vendor && tar -xvf pcre-8.44-static.tar.gz && cd pcre-8.44 && mkdir cmake_build && cd cmake_build && cmake -DCMAKE_BUILD_TYPE=Release .. && make && make install
RUN cd /opt/vendor && tar -xvf mongo-c-driver-1.17.4.tar.gz && cd mongo-c-driver-1.17.4 && mkdir cmake-build && cd cmake-build && cmake -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DCMAKE_BUILD_TYPE=Release .. && make -j5 && make install
